<?php
$filas = $this->vars['data']['list'];
$filas_chair = $this->vars['data_chair']['list_chair'];
$html = '';

if(!$filas) {
    $html = '<tr><td colspan="2" align="center"><strong>No se encontraron registros</strong></td></tr>';
}
else {
    foreach($filas as $fila) {
        $html .= '<tr>';
        $html .= "<td>T".utf8_encode($fila->getIdTrack())." - ".utf8_encode($fila->getNombre()) ."</td>";
        foreach($filas_chair as $fila_chair) {
            if($fila->getIdChair()==$fila_chair->getIdChair()) {
                $html .= "<td>".utf8_encode($fila_chair->getApellido().", ".$fila_chair->getNombre())."</td>";
                $html .= "<td><a href='mailto:".$fila_chair->getEmail1()."'>".$fila_chair->getEmail1()."</a></td>";
                $html .= "<td>".utf8_encode($fila_chair->getInstitucion())."</td>";
                //$html .= "<td>".$fila_chair->getCargo()."</td>";
            }
        }
        $html .= '</tr>';
    }
}
echo($html);

?>